/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.designPatterns.mediator;

/**
 *
 * @author minga
 */
public class Mediator {
    Buyer swedishBuyer ;
     Buyer frenchBuyer ;
  AmericanSeller americanSeller ;
  DollarsConverter dollarConverter ;
  public Mediator()
  {
      
  }
  public void registerSwedishBuyer(SwedishBuyer swedishBuyer)
  {
      this.swedishBuyer = swedishBuyer;
  }
  public void registerFrenchBuyer(FrenchBuyer frenchBuyer)
  {
      this.frenchBuyer = frenchBuyer;
  }
  public void registerDollarConverter(DollarsConverter dollarConverter)
  {
      this.dollarConverter = dollarConverter;
  }
  public boolean placeBid(float bid,String UnitOfCurrency)
  {
      float dollarAmount = dollarConverter.convertCurrencyToDollars(bid, UnitOfCurrency);
      return americanSeller.isBidAccepted(bid);
  }

    void registerAmericanSeller(AmericanSeller aThis) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

}
